package com.example.demo.mapper;

import com.example.demo.po.Material;
import com.example.demo.po.MaterialAppeal;
import com.example.demo.po.dto.MaterialAppealParam;
import com.example.demo.po.dto.MaterialUsageParam;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MaterialAppealMap {

    void SaveMaterialAppeal(MaterialAppeal appeal);

    void DeleteMaterialAppeal(int id);

    void UpdateMaterialAppeal(MaterialAppeal appeal);

    void UpdateMaterialAppealState(MaterialAppealParam param);
    void UpdateAdmin(MaterialAppealParam param);
    void UpdateReturnTime(MaterialAppealParam param);

    List<MaterialAppeal> GetMaterialAppeals();

    List<MaterialAppeal> SearchMaterialAppealsByAllName(String adminName,String materialName);
    List<MaterialAppeal> SearchMaterialAppealsByadminName(String adminName);
    List<MaterialAppeal> SearchMaterialAppealsBymaterialName(String materialName);

    List<MaterialAppeal> CountBorrow();
    List<MaterialAppeal> CountReturn();
    List<MaterialUsageParam> CountUsage();


}
